{% extends 'org_base.html' %}
{% load staticfiles %}
{% block title %}<title> </title>{% endblock %}
{% block custom_css %} {% endblock %}
{% block custom_js %} {% endblock %}
{% block org_path %}
    <section>
	<div class="wp">
		<ul  class="crumbs">
            <li><a href="{% url 'index' %}">首页</a>></li>
			<li><a href="{% url 'org:org_list' %}">课程机构</a>></li>
			<li>机构课程列表</li>
		</ul>
	</div>
    </section>
{% endblock %}
{% block content %}
    <div class="right companycenter layout" >
		<div class="head">
			<h1>机构课程</h1>
		</div>
		<div class="brief group_list">
            {% for course in courses.object_list %}
                <div class="module1_5 box">
                    <a class="comp-img-box" href="{% url 'course:course_detail' course.id %}">

                        <img width="214" height="195" src="{{ MEDIA_URL }}{{ course.image }}"/>
                    </a>
                    <div class="des">
                        <a href="{% url 'course:course_detail' course.id %}"><h2>{{ course.name }}</h2></a>
                        <span class="fl">课时：<i class="key">{{ course.learn_time }}</i></span>
                        <span class="fr">学习人数：{{ course.student_num }}</span>
                    </div>
                    <div class="bottom">
                        <span class="fl">{{ org.name }}</span>
                         <span class="star fr  notlogin {% if course.id in fav_course_ids %}collected{% endif %}
                            " data-favid="13" data-fav-type="4">
                            {{ course.fav_num }}
                        </span>
                    </div>
                </div>
            {% endfor %}

		</div>
        <div class="footer pageturn">
                <ul class="pagelist">
                {% if courses.has_previous %}
                <li class="long"><a href="?{{ courses.previous_page_number.querystring }}">上一页</a></li>
            {% endif %}
                {% for page in courses.pages %}
                {% if page %}
                    {% ifequal page courses.number %}
                <li class="active"><a class="page">{{ page }}</a> </li>
                    {% else %}
                <li><a href="?{{ page.querystring }}" class="page">{{ page }}</a></li>
                    {% endifequal %}
                {% else %}
                <li class="none"><span>...</span></li>
                {% endif %}
            {% endfor %}
                {% if courses.has_next %}
                <li class="long"><a href="?{{ courses.next_page_number.querystring }}">下一页</a></li>
            {% endif %}
                </ul>
            </div>
	</div>
{% endblock %}

